1. Field of the Invention
The present invention generally relates to computer systems, and more particularly to a system and method for performing high speed data transfers between a host memory and a graphics accelerator in a computer graphics system.
2. Discussion of the Related Art
Computer graphics systems are commonly used for displaying graphical representations of objects on a two-dimensional video display screen. Current computer graphics display systems provide highly detailed representations and are used in a variety of applications. A computer graphics display system generally comprises a central processing unit (CPU), system memory, a graphics machine and a video display screen.
In typical computer graphics display systems, an object to be presented on the display screen is broken down into graphics primitives. Primitives are basic components of a graphics display and may include points, lines, vectors and polygons (e.g., triangles and quadrilaterals). Typically, a hardware/software scheme is implemented to render, or draw, the graphics primitives that represent a view of one or more objects being represented on the display screen.
Generally, the primitives of each three-dimensional object to be rendered are defined by the host CPU in terms of primitive data. For example, when the primitive is a triangle, the host computer may define the primitive in terms of the X, Y and Z coordinates of its vertices, as well as in terms of the red, green, blue and alpha (R, G, B and .alpha.) color values of each vertex. Alpha is a transparency value. Additional primitive data may be used in specific applications. Rendering hardware interpolates the primitive data to compute the display screen pixels that represent each primitive, and the R, G, B and .alpha. values for each pixel.
The graphics machine generally includes a geometry accelerator, a rasterizer, a frame buffer controller and a frame buffer. The graphics machine may also include texture mapping hardware. The geometry accelerator receives vertex data from the host CPU that defines the primitives that make up the view to be displayed. The geometry accelerator typically comprises a transform component which receives vertex data from host or system memory via the CPU, a clipping component, an illumination component, and a plane equations component. The transform component performs transformations on the vertex data received from the CPU, such as rotation and translation of the image space defined by vertex data. The clipping component clips the vertex data so that only vertex data relating to primitives that make up the portion of the view that will be seen by the user is kept for further processing. The illumination or lighting component calculates the final colors of the vertices of the primitives based on the vertex data and based on lighting conditions. The plane equations component generates floating point equations which define the image space within the vertices. The floating point equations are later converted into fixed point equations and the rasterizer and texture mapping hardware generate the final screen coordinate and color data for each pixel in each primitive.
With the foregoing as providing general background into computer graphics systems, it is well known in the art that a vast amount of primitive data is generally processed by the graphics machine (e.g., geometry accelerator) in a computer graphics system. As is further known, the transfer of this vast amount of data from the host memory to the graphics machine for processing generally presents a bottleneck in the system performance. Specifically, the primitive data is generally routed from the system memory to the graphics machine via the CPU bus, which has bandwidth limitations that significantly limit the transfer rate.
Further still, some computer systems, by design, result in further performance degradation. For example, a computer system running under Microsoft Windows NT (NT) operating system, as opposed to a Unix operating system, has additional overhead associated with context switching. Context switching occurs each time the system switches from kernel space to user space (or from user space to kernel space). As a specific example, when a system switches from kernel space to user space in order to transfer graphics data to the graphics machine, the CPU must save context data (i.e., CPU state information) and build a buffer of graphics data, before transferring graphics data from the host memory to the graphics machine. Once the graphics data transfer is complete, this context data (e.g., CPU state information) must be transferred back to the CPU so that it may "seamlessly" resume operation at the same point in its "kernel" state. This context switching adds further overhead, and thus performance degradation, to the system.
Accordingly, it is desired to provide a computer graphics system that overcomes these shortcomings of the prior art, and one which achieves improved performance over prior art systems.